package com.jilefojing.service;

import java.util.List;

import com.jilefojing.beans.enums.ItemTypeEnumForSource;
import com.jilefojing.beans.exception.UserContextException;
import com.jilefojing.beans.pojos.Tag;
import com.jilefojing.beans.pojos.enhanced.EnhancedTag;
import com.jilefojing.beans.query.TagQuery;
import com.jilefojing.beans.vo.Pagination;
import com.jilefojing.context.beans.vo.UserContext;
import com.jilefojing.service.base.IBaseService;

/**
 * 
 * @author 作者 jgshun
 * @date 创建时间 2016年07月25日 22时00分52秒
 */
public interface ITagService extends IBaseService<Tag> {

	Pagination<EnhancedTag> getPagination(TagQuery tagQuery, Pagination<EnhancedTag> pagination, UserContext userContext);

	Pagination<EnhancedTag> getPaginationByItemTypesForHot(List<ItemTypeEnumForSource> itemTypes, Pagination<EnhancedTag> pagination, UserContext userContext);

	List<EnhancedTag> appendCountSourcesByItemTypes(List<EnhancedTag> enhancedTags, List<ItemTypeEnumForSource> itemTypes, UserContext userContext);

	List<EnhancedTag> appendEnhancedUser(List<EnhancedTag> enhancedTags, UserContext userContext);

	/**
	 * 
	 * @param id
	 * @param force
	 *            是否强制删除
	 * @param userContext
	 * @throws UserContextException
	 */
	void deleteById(long id, boolean force, UserContext userContext) throws UserContextException;

	/**
	 * 
	 * @param ids
	 * @param force
	 *            是否强制删除
	 * @param userContext
	 * @throws UserContextException
	 */
	void deleteByIds(List<Long> ids, boolean force, UserContext userContext) throws UserContextException;

	Tag add(Tag tag, UserContext userContext) throws UserContextException;

	/**
	 * 更新名称
	 * 
	 * @param tag
	 * @param userContext
	 * @throws UserContextException
	 */
	Tag update(Tag tag, UserContext userContext) throws UserContextException;

}
